<style type="text/css">
.search{
  height:50px;
}
.search input,.search label,.search .btn-bid-auction{
  float: left;
}
.search input{
  margin: 2px 0 0 10px;
  
}
.search span{
  width: 250px;
  display: block;
}
.search label{
  margin: 10px 0 0 0;
}
.search .btn-bid-auction{
  width: auto;
  letter-spacing: 0px;
  margin: 2px 0 0 10px;

}
</style>
<?php $statusArr = UserOrder::model()->allStatus;?>
<div class="notification-main">
	<div class="History-box">
	  <h1 class="title">Order History</h1>
    <div class="search"><label>Search your orders:</label><input type="text" name="search" class="form-control" id="order_id" value=""><button class="btn btn-bid-auction" id="search" onclick="search();">search</button></div>
    <?php  
  foreach ($orderhistory as $k => $v) {
  ?>
		<table width="848" border="1" class="datalist">
  <tr>
  	<td width="10%" align="center" valign="middle" class="rowone">Order Id</td>
    <td width="10%" align="center" valign="middle" class="rowone">Auction Id</td>
    <td width="20%" align="center" valign="middle" class="rowone">Status</td>
    <td width="20%" align="center" valign="middle" class="rowone">Price</td>
    <td width="20%" align="center" valign="middle" class="rowone">Qty</td>
    <td colspan="2" align="center" valign="middle" class="rowone">Total</td>

  </tr>
  
  <tr>
  	<td align="center"><?php echo $v['id'];?></td>
    <td align="center"><a href="<?php echo Yii::app()->baseUrl;?>/index/detail?auction_id=<?php echo $v['auction_id']?>"><?php echo $v['auction_id'];?></a></td>
    <td align="center"><?php echo $statusArr[$v['status']];?></td>
    <td align="center">$<?php echo $v['price'];?></td>
    <td align="center"><?php echo $v['quantity'];?></td>
    <td colspan="2" align="center">$<?php echo $v['total_price'];?></td>

  </tr>
  <tr class="noborder">
  	<td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
    <td width="141">Shipping:</td>
    <td width="42">$<?php echo$v['shipping_fee']?></td>

  </tr>

  <tr class="noborder">
  	<td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
    <td>Order Total :</td>
    <td>$<?php echo$v['total_price']?></td>

  </tr>
    </table>

  <?php }?>
<?php 
         $this->widget('CLinkPager',array(
               'header'=>'',
               'firstPageLabel' => '首页',
               'lastPageLabel' => '末页',
               'prevPageLabel' => '上一页',
               'nextPageLabel' => '下一页',
               'pages' => $pages,
               'maxButtonCount'=>5,
         )
         );?>

	</div>
</div>
<script type="text/javascript">
function search(){
	console.log(1231231);
  location.href="?order="+$("#order_id").val();
}
</script>